DevJourney

Python/RegEx/String's First Word/re.match().py

import re

s = input("Enter statement: ")
reg = r'\w+'
res = re.match(reg,s)
print(res.group())
View on GitHub